package com.jic.market.service;

import com.jic.common.base.vo.Page;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.entity.PatchGrouponTheme;
import com.jic.market.entity.PatchGrouponThemeEntity;
import com.jic.market.request.PatchGrouponThemeCopyRequest;
import com.jic.market.request.PatchGrouponThemeRequest;
import com.jic.market.request.PromotionRequest;
import com.jic.market.request.ToUpdateStatusRequest;
import com.jic.market.request.manager.patchgroup.PatchGroupIdListQueryRequest;
import com.jic.market.response.PageResponse;
import com.jic.market.response.PatchGrouponThemeResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
* 拼团活动表
* @author : yinhaijun
* @email : 
* @since : 2020-01-10 11:11:23
* @version : v1.0.0
*/
public interface PatchGrouponThemeService {

    Long insert(PatchGrouponThemeRequest patchGrouponThemeRequest);

    long delete(Long id);

    long update(PatchGrouponTheme patchGrouponTheme);

    PatchGrouponThemeEntity queryById(Long id);

    List<PatchGrouponTheme> query(PatchGrouponTheme patchGrouponTheme);

    PageResult<PatchGrouponTheme> queryPage(PatchGrouponTheme patchGrouponTheme, Page pageQuery);

    Long save(PatchGrouponThemeRequest p);

    PageResponse<PatchGrouponThemeResponse> queryPage2(PatchGrouponThemeRequest request);

    Long copy(Long id);

    /**
     * 复制
     * @param request
     * @return 新的promotionId
     */
    RestResult<Long> copy(PatchGrouponThemeCopyRequest request);

    /**
     * 保存为模板
     * @param request
     * @return
     */
    RestResult<Long> saveTemplate(PatchGrouponThemeCopyRequest request);

    Integer updateById(PatchGrouponThemeRequest bo);

    PatchGrouponThemeResponse getById(Long id);

    /**
     * 根据拼团活动code，查询活动信息
     * @param groupCode
     * @return
     */
    PatchGrouponThemeResponse getByPromotionCode(String groupCode);

    /**
     * 根据id 及操作权限查询
     * @param bo
     * @return
     */
    PatchGrouponThemeResponse getPatchGrouponThemeByIdAndAdminOperate(PatchGrouponThemeRequest bo);

    /**
     * 根据ids 查询列表
     * @param request
     * @return
     */
    List<PatchGrouponThemeResponse> queryListByIds(PatchGroupIdListQueryRequest request);

    /**
     * 更新活动状态
     * @param req
     * @return
     */
    RestResult<Long> doUpdateStatus(@RequestBody ToUpdateStatusRequest req);

    /**
     * 更新状态检查商家店铺与商品
     * @param request
     * @return
     */
    RestResult reviewPromotion(ToUpdateStatusRequest request);


}